hackerrank string permutation

visit shbcf.ru